<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.util.List" %>
<%@ page import="oneroom.admin.oneroom.roomModel" %>
<%@ page import="oneroom.admin.code.codeModel" %>
<jsp:useBean id="dao" scope="page" class="oneroom.admin.oneroom.roomDao" />
<jsp:useBean id="codeDao" scope="page" class="oneroom.admin.code.codeDao" />
<%
	List subwayList = codeDao.getDtlList("001");// 지하철
	List heatingList = codeDao.getDtlList("300");// 난방 시설
	List airconditioningList = codeDao.getDtlList("301");// 냉방 시설
	List  university1List = codeDao.getDtlList("400");// 대학교 지역
	List  roomnumberList = codeDao.getDtlList("500");// 매물 종류
	List  furnitureList = codeDao.getDtlList("302");// 가구
	List  appliancesList = codeDao.getDtlList("303");//가전
	List  kitchenList = codeDao.getDtlList("304"); //주방
	List  securityList = codeDao.getDtlList("305"); //보안
	List  facilityList = codeDao.getDtlList("306"); //주변시설
	
	//기본 세트 값 시작
	String searchGubn = request.getParameter("searchGubn") 			== null ? "" : request.getParameter("searchGubn");
	String searchValue = request.getParameter("searchValue") 		== null ? "" : request.getParameter("searchValue");
	String giSelectPage = request.getParameter("txtSelectPage") 	== null ? "" : request.getParameter("txtSelectPage");
	String giSelectBlock = request.getParameter("txtSelectBlock") 	== null ? "" : request.getParameter("txtSelectBlock");
	//기본 세트 값 끝

	String oneroom_seq = request.getParameter("oneroom_seq") == null ? "" : request.getParameter("oneroom_seq");
	roomModel model = dao.getView(oneroom_seq);
	
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>원룸 - 매물 정보</title>
<script type="text/javascript" src="/admin/js/default.js"></script>
<link href="/admin/css/default.css" rel="stylesheet" type="text/css" />
<!--[if lte IE 6]><link rel="stylesheet" href="/admin/css/forie6.css" type="text/css" /><![endif]-->
<script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
<!--
$(document).ready(function(){
	$.ajax({type : "post",
		url : "/admin/room/subway.jsp",
		dataType : "html",
		data : "maincode=<%=model.getSubway1()%>&dtlcode=<%=model.getSubway2()%>",
		success : function(msg){
			document.getElementById("divSubWay2").innerHTML = msg;
		}
	});
	$.ajax({type : "post",
		url : "/admin/room/university2.jsp",
		dataType : "html",
		data : "maincode=<%=model.getUniversity1()%>&dtlcode=<%=model.getUniversity2()%>",
		success : function(msg){
			document.getElementById("divuniversity2").innerHTML = msg;
		}
	});
	$('#subway1').change(function() {
		$.ajax({type : "post",
			url : "/admin/room/subway.jsp",
			dataType : "html",
			data : "maincode="+document.getElementById("subway1").value,
			success : function(msg){
				document.getElementById("divSubWay2").innerHTML = msg;
			}
		});
	});
	$('#university1').change(function() {
		$.ajax({type : "post",
			url : "/admin/room/university2.jsp",
			dataType : "html",
			data : "maincode="+document.getElementById("university1").value,
			success : function(msg){
				document.getElementById("divuniversity2").innerHTML = msg;
			}
		});
	});
	$('#btList').click(function() {
		window.location.href="list.jsp";
	});
	$('#zip_code').click(function() {
		window.open('/admin/common/zipcode.jsp', 'zipcode','scrollbars=yes, height=500px,width=500px');
	});
	$('#address1').click(function() {
		window.open('/admin/common/zipcode.jsp', 'zipcode','scrollbars=yes, height=500px,width=500px');
	});
	$('#address2').click(function() {
		window.open('/admin/common/zipcode.jsp', 'zipcode','scrollbars=yes, height=500px,width=500px');
	});
	$('#address3').click(function() {
		window.open('/admin/common/zipcode.jsp', 'zipcode','scrollbars=yes, height=500px,width=500px');
	});
	$('#address4').click(function() {
		window.open('/admin/common/zipcode.jsp', 'zipcode','scrollbars=yes, height=500px,width=500px');
	});
	$('#address5').click(function() {
		window.open('/admin/common/zipcode.jsp', 'zipcode','scrollbars=yes, height=500px,width=500px');
	});
	$('#zipcode1').click(function() {
		window.open('/admin/common/zipcode.jsp', 'zipcode','scrollbars=yes, height=500px,width=500px');
	});
	$('#zipcode2').click(function() {
		window.open('/admin/common/zipcode.jsp', 'zipcode','scrollbars=yes, height=500px,width=500px');
	});
});

function display(no){
    for(var i=1; i<=2; i++){
        document.getElementById("charter_type"+i).style.display="none";
    }
    document.getElementById("charter_type"+no).style.display="block";
    if(no == "2"){
    	document.getElementById("charter_name").innerHTML = "월세";
    }else{
    	document.getElementById("charter_name").innerHTML = "전세";
    }
}
//-->
</script>
</head>
<body>
<div id="bodywrap">
	<div class="all-wrap">
		<%@ include file="/admin/common/top.jsp" %>
		<div id="right-wrap">
			<%@ include file="/admin/common/navi.jsp" %>
			<!--Contents Start-->
			<div id="content">
				<form action="roomdbx.jsp" name="frm" id="frm" method="post" enctype="multipart/form-data"> 
				<input type="hidden" name="gubun" value="U" />
				<input type="hidden" name="oneroom_seq" value="<%=oneroom_seq %>"/>
				<!-- 타이틀 및 전체 갯수 검색 시작 -->
				<div class="path">
					<span>home</span> &gt;  매물 정보
				</div>
				<h4>매물 정보</h4>
				<p class="sub-text">매물 정보 확인/관리 하실 수 있습니다.</p>
				<!-- 타이틀 및 전체 갯수 검색  끝-->
				<!-- 실제적인 리스트 시작 -->
				<p class="sub-text2">기본 정보</p>
					<table class="view-normal" cellpadding="0" cellspacing="0" summary="매물 정보" >
					<caption>매물 정보</caption>
					    <col width="100px" />  
					    <col width="239px" />  
					    <col width="100px" />  
					    <col width="239px" />  
				    <tbody>
						<tr>
							<th scope="row" >주소</th>
							<td>
								<input name="address1" id="address1" value="<%=model.getAddress1() %>" title="주소 입력" type="text"  style="width:40px;"  readonly="readonly" />
								<input name="address2" id="address2" value="<%=model.getAddress2() %>" title="주소 입력" type="text"  style="width:40px;"  readonly="readonly" />
								<input name="address3" id="address3" value="<%=model.getAddress3() %>" title="주소 입력" type="text"  style="width:40px;"  readonly="readonly" />
								<input name="address4" id="address4" value="<%=model.getAddress4() %>" title="주소 입력" type="text"  style="width:40px;"  readonly="readonly" /><br>
								<input name="address5" id="address5" value="<%=model.getAddress5() %>" title="주소 입력" type="text"  style="width:200px;"  readonly="readonly" />
								
							</td>
							<th scope="row" >번지</th>
							<td>
								<input name="zipcode1" id="zipcode1" value="<%=model.getZipcode1() %>" title="주소 입력" type="text"  style="width:50px;"  readonly="readonly" />
								~ <input name="zipcode2" id="zipcode2" value="<%=model.getZipcode2() %>" title="주소 입력" type="text"  style="width:50px;"  readonly="readonly" />
								<input type="button" name="zip_code" id="zip_code" value="주소 검색" class="btn-bg-gray" />
							</td>
				        </tr>
				        <tr>
							<th scope="row" >방수</th>
							<td>
								<select name="roomnumber" style="width:50px;">
									<option value="1" <%if(model.getRoomnumber().equals("1")){out.print(" selected='selected'");} %> >1</option>
									<option value="2" <%if(model.getRoomnumber().equals("2")){out.print(" selected='selected'");} %> >2</option>
									<option value="3" <%if(model.getRoomnumber().equals("3")){out.print(" selected='selected'");} %> >3</option>
									<option value="4" <%if(model.getRoomnumber().equals("4")){out.print(" selected='selected'");} %> >4</option>
									<option value="5" <%if(model.getRoomnumber().equals("5")){out.print(" selected='selected'");} %> >5</option>
									<option value="6" <%if(model.getRoomnumber().equals("6")){out.print(" selected='selected'");} %> >6</option>
									<option value="7" <%if(model.getRoomnumber().equals("7")){out.print(" selected='selected'");} %> >7</option>
									<option value="8" <%if(model.getRoomnumber().equals("8")){out.print(" selected='selected'");} %> >8</option>
									<option value="9" <%if(model.getRoomnumber().equals("9")){out.print(" selected='selected'");} %> >9</option>
									<option value="10" <%if(model.getRoomnumber().equals("10")){out.print(" selected='selected'");} %> >10</option>
								</select> 개
							</td>
							<th scope="row" >매물종류 </th>
							<td>
<%
	for(int i = 0; i < roomnumberList.size(); i++){
		codeModel mode = (codeModel)roomnumberList.get(i);
%>
									<input type="radio" name="roomkind" value="<%=mode.getCode() %>" <%if(mode.getCode().equals(model.getRoomkind())){ %>checked="checked" <%} %>/> <%=mode.getCodename() %>				
<%
	}
%>
							</td>
				        </tr>
				        <tr>
							<th scope="row" >평수</th>
							<td>
								<input name="roomarea" id="roomarea" value="<%=model.getRoomarea() %>" title="평수" type="text"  style="width:50px;" /> 평
							</td>
						    <th scope="row">임대형태</th>
						    <td>
						    <input type="radio" name="charter" value="J" checked="checked" onclick="display('1');"/>전세 
							<input type="radio" name="charter" value="W" onclick="display('2');"/>월세
							</td>							
				        </tr>
				        </tr>
				        <tr>
							<th scope="row" >층</th>
							<td>
								<select name="roomfloor1" style="width:50px;">
									<option value="1" <%if(model.getRoomfloor1().equals("1")){out.print(" selected='selected' ");} %>>1층</option>
									<option value="2" <%if(model.getRoomfloor1().equals("2")){out.print(" selected='selected' ");} %>>2층</option>
									<option value="3" <%if(model.getRoomfloor1().equals("3")){out.print(" selected='selected' ");} %>>3층</option>
									<option value="4" <%if(model.getRoomfloor1().equals("4")){out.print(" selected='selected' ");} %>>4층</option>
									<option value="5" <%if(model.getRoomfloor1().equals("5")){out.print(" selected='selected' ");} %>>5층</option>
									<option value="6" <%if(model.getRoomfloor1().equals("6")){out.print(" selected='selected' ");} %>>6층</option>
									<option value="7" <%if(model.getRoomfloor1().equals("7")){out.print(" selected='selected' ");} %>>7층</option>
									<option value="8" <%if(model.getRoomfloor1().equals("8")){out.print(" selected='selected' ");} %>>8층</option>
									<option value="9" <%if(model.getRoomfloor1().equals("9")){out.print(" selected='selected' ");} %>>9층</option>
									<option value="10" <%if(model.getRoomfloor1().equals("10")){out.print(" selected='selected' ");} %>>10층</option>
									<option value="11" <%if(model.getRoomfloor1().equals("11")){out.print(" selected='selected' ");} %>>11층</option>
									<option value="12" <%if(model.getRoomfloor1().equals("12")){out.print(" selected='selected' ");} %>>12층</option>
									<option value="13" <%if(model.getRoomfloor1().equals("13")){out.print(" selected='selected' ");} %>>13층</option>
									<option value="14" <%if(model.getRoomfloor1().equals("14")){out.print(" selected='selected' ");} %>>14층</option>
									<option value="15" <%if(model.getRoomfloor1().equals("15")){out.print(" selected='selected' ");} %>>15층</option>
									<option value="16" <%if(model.getRoomfloor1().equals("16")){out.print(" selected='selected' ");} %>>16층</option>
									<option value="17" <%if(model.getRoomfloor1().equals("17")){out.print(" selected='selected' ");} %>>17층</option>
									<option value="18" <%if(model.getRoomfloor1().equals("18")){out.print(" selected='selected' ");} %>>18층</option>
									<option value="19" <%if(model.getRoomfloor1().equals("19")){out.print(" selected='selected' ");} %>>19층</option>
									<option value="20" <%if(model.getRoomfloor1().equals("20")){out.print(" selected='selected' ");} %>>20층</option>
									<option value="21" <%if(model.getRoomfloor1().equals("21")){out.print(" selected='selected' ");} %>>21층</option>
									<option value="22" <%if(model.getRoomfloor1().equals("22")){out.print(" selected='selected' ");} %>>22층</option>
									<option value="23" <%if(model.getRoomfloor1().equals("23")){out.print(" selected='selected' ");} %>>23층</option>
									<option value="24" <%if(model.getRoomfloor1().equals("24")){out.print(" selected='selected' ");} %>>24층</option>
									<option value="25" <%if(model.getRoomfloor1().equals("25")){out.print(" selected='selected' ");} %>>25층</option>
									<option value="26" <%if(model.getRoomfloor1().equals("26")){out.print(" selected='selected' ");} %>>26층</option>
									<option value="27" <%if(model.getRoomfloor1().equals("27")){out.print(" selected='selected' ");} %>>27층</option>
									<option value="28" <%if(model.getRoomfloor1().equals("28")){out.print(" selected='selected' ");} %>>28층</option>
									<option value="29" <%if(model.getRoomfloor1().equals("29")){out.print(" selected='selected' ");} %>>29층</option>
									<option value="30" <%if(model.getRoomfloor1().equals("30")){out.print(" selected='selected' ");} %>>30층</option>
									<option value="31" <%if(model.getRoomfloor1().equals("31")){out.print(" selected='selected' ");} %>>31층</option>
									<option value="32" <%if(model.getRoomfloor1().equals("32")){out.print(" selected='selected' ");} %>>31층</option>
									<option value="33" <%if(model.getRoomfloor1().equals("33")){out.print(" selected='selected' ");} %>>32층</option>
									<option value="34" <%if(model.getRoomfloor1().equals("34")){out.print(" selected='selected' ");} %>>33층</option>
									<option value="35" <%if(model.getRoomfloor1().equals("35")){out.print(" selected='selected' ");} %>>34층</option>
									<option value="36" <%if(model.getRoomfloor1().equals("36")){out.print(" selected='selected' ");} %>>35층</option>
									<option value="37" <%if(model.getRoomfloor1().equals("37")){out.print(" selected='selected' ");} %>>36층</option>
									<option value="38" <%if(model.getRoomfloor1().equals("38")){out.print(" selected='selected' ");} %>>37층</option>
									<option value="39" <%if(model.getRoomfloor1().equals("39")){out.print(" selected='selected' ");} %>>38층</option>
									<option value="40" <%if(model.getRoomfloor1().equals("40")){out.print(" selected='selected' ");} %>>39층</option>
								</select> / 
								<select name="roomfloor2" style="width:50px;">
									<option value="1" <%if(model.getRoomfloor2().equals("1")){out.print(" selected='selected' ");} %>>1층</option>
									<option value="2" <%if(model.getRoomfloor2().equals("2")){out.print(" selected='selected' ");} %>>2층</option>
									<option value="3" <%if(model.getRoomfloor2().equals("3")){out.print(" selected='selected' ");} %>>3층</option>
									<option value="4" <%if(model.getRoomfloor2().equals("4")){out.print(" selected='selected' ");} %>>4층</option>
									<option value="5" <%if(model.getRoomfloor2().equals("5")){out.print(" selected='selected' ");} %>>5층</option>
									<option value="6" <%if(model.getRoomfloor2().equals("6")){out.print(" selected='selected' ");} %>>6층</option>
									<option value="7" <%if(model.getRoomfloor2().equals("7")){out.print(" selected='selected' ");} %>>7층</option>
									<option value="8" <%if(model.getRoomfloor2().equals("8")){out.print(" selected='selected' ");} %>>8층</option>
									<option value="9" <%if(model.getRoomfloor2().equals("9")){out.print(" selected='selected' ");} %>>9층</option>
									<option value="10" <%if(model.getRoomfloor2().equals("10")){out.print(" selected='selected' ");} %>>10층</option>
									<option value="11" <%if(model.getRoomfloor2().equals("11")){out.print(" selected='selected' ");} %>>11층</option>
									<option value="12" <%if(model.getRoomfloor2().equals("12")){out.print(" selected='selected' ");} %>>12층</option>
									<option value="13" <%if(model.getRoomfloor2().equals("13")){out.print(" selected='selected' ");} %>>13층</option>
									<option value="14" <%if(model.getRoomfloor2().equals("14")){out.print(" selected='selected' ");} %>>14층</option>
									<option value="15" <%if(model.getRoomfloor2().equals("15")){out.print(" selected='selected' ");} %>>15층</option>
									<option value="16" <%if(model.getRoomfloor2().equals("16")){out.print(" selected='selected' ");} %>>16층</option>
									<option value="17" <%if(model.getRoomfloor2().equals("17")){out.print(" selected='selected' ");} %>>17층</option>
									<option value="18" <%if(model.getRoomfloor2().equals("18")){out.print(" selected='selected' ");} %>>18층</option>
									<option value="19" <%if(model.getRoomfloor2().equals("19")){out.print(" selected='selected' ");} %>>19층</option>
									<option value="20" <%if(model.getRoomfloor2().equals("20")){out.print(" selected='selected' ");} %>>20층</option>
									<option value="21" <%if(model.getRoomfloor2().equals("21")){out.print(" selected='selected' ");} %>>21층</option>
									<option value="22" <%if(model.getRoomfloor2().equals("22")){out.print(" selected='selected' ");} %>>22층</option>
									<option value="23" <%if(model.getRoomfloor2().equals("23")){out.print(" selected='selected' ");} %>>23층</option>
									<option value="24" <%if(model.getRoomfloor2().equals("24")){out.print(" selected='selected' ");} %>>24층</option>
									<option value="25" <%if(model.getRoomfloor2().equals("25")){out.print(" selected='selected' ");} %>>25층</option>
									<option value="26" <%if(model.getRoomfloor2().equals("26")){out.print(" selected='selected' ");} %>>26층</option>
									<option value="27" <%if(model.getRoomfloor2().equals("27")){out.print(" selected='selected' ");} %>>27층</option>
									<option value="28" <%if(model.getRoomfloor2().equals("28")){out.print(" selected='selected' ");} %>>28층</option>
									<option value="29" <%if(model.getRoomfloor2().equals("29")){out.print(" selected='selected' ");} %>>29층</option>
									<option value="30" <%if(model.getRoomfloor2().equals("30")){out.print(" selected='selected' ");} %>>30층</option>
									<option value="31" <%if(model.getRoomfloor2().equals("31")){out.print(" selected='selected' ");} %>>31층</option>
									<option value="32" <%if(model.getRoomfloor2().equals("32")){out.print(" selected='selected' ");} %>>31층</option>
									<option value="33" <%if(model.getRoomfloor2().equals("33")){out.print(" selected='selected' ");} %>>32층</option>
									<option value="34" <%if(model.getRoomfloor2().equals("34")){out.print(" selected='selected' ");} %>>33층</option>
									<option value="35" <%if(model.getRoomfloor2().equals("35")){out.print(" selected='selected' ");} %>>34층</option>
									<option value="36" <%if(model.getRoomfloor2().equals("36")){out.print(" selected='selected' ");} %>>35층</option>
									<option value="37" <%if(model.getRoomfloor2().equals("37")){out.print(" selected='selected' ");} %>>36층</option>
									<option value="38" <%if(model.getRoomfloor2().equals("38")){out.print(" selected='selected' ");} %>>37층</option>
									<option value="39" <%if(model.getRoomfloor2().equals("39")){out.print(" selected='selected' ");} %>>38층</option>
									<option value="40" <%if(model.getRoomfloor2().equals("40")){out.print(" selected='selected' ");} %>>39층</option>
								</select>
							</td>
					   		<th scope="row"><span id="charter_name">전세</span></th>
					   		<td>
							<div id="charter_type1"  style="display: block;">
							<input name="roommoney" id="roommoney" value="<%=model.getRoommoney() %>" title="전세금" type="text"  style="width:50px;" /> 만원
							</div>
							<div id="charter_type2"  style="display: none;">
							보증금 : <input name="roommonth1" id="roommonth1" value="<%=model.getRoommonth1() %>" title="월세 보증금" type="text"  style="width:50px;" /> 만원 /<br/> 
							월 : <input name="roommonth2" id="roommonth2" value="<%=model.getRoommonth2() %>" title="월세금" type="text"  style="width:50px;" /> 만원
							</div>					
							</td>
				        </tr>
				        <tr>
							<th scope="row" >주차</th>
							<td>
								<select name="car" style="width:50px;">
									<option value="1" <%if(model.getCar().equals("1")){out.print(" selected='selected' ");} %>>1</option>
									<option value="2" <%if(model.getCar().equals("2")){out.print(" selected='selected' ");} %>>2</option>
									<option value="3" <%if(model.getCar().equals("3")){out.print(" selected='selected' ");} %>>3</option>
									<option value="4" <%if(model.getCar().equals("4")){out.print(" selected='selected' ");} %>>4</option>
									<option value="5" <%if(model.getCar().equals("5")){out.print(" selected='selected' ");} %>>5</option>
									<option value="6" <%if(model.getCar().equals("6")){out.print(" selected='selected' ");} %>>6</option>
									<option value="7" <%if(model.getCar().equals("7")){out.print(" selected='selected' ");} %>>7</option>
									<option value="8" <%if(model.getCar().equals("8")){out.print(" selected='selected' ");} %>>8</option>
									<option value="9" <%if(model.getCar().equals("9")){out.print(" selected='selected' ");} %>>9</option>
									<option value="10" <%if(model.getCar().equals("10")){out.print(" selected='selected' ");} %>>10</option>
								</select> 대
							</td>
							<th scope="row" >관리비 </th>
							<td>
								<input name="managemoney" id="managemoney" value="<%=model.getManagemoney() %>" title="관리비" type="text"  style="width:100px;" /> 만원
							</td>
				        </tr>
					</tbody>
					</table>
					<br></br>
					<p class="sub-text2"> 주변 환경 및 옵션 정보</p>
					<table class="view-normal" cellpadding="0" cellspacing="0" summary="매물 정보" >
					<caption>매물 정보</caption>
					    <col width="100px" />  
					    <col width="239px" />  
					    <col width="100px" />  
					    <col width="239px" />  
				    <tbody>
				     <tr>
							<th scope="row" >지하철</th>
							<td>
								<select name="subway1" id="subway1" style="width:100px;">
<%
	for(int i = 0; i < subwayList.size(); i++){
		codeModel mode = (codeModel)subwayList.get(i);
%>
									<option value="<%=mode.getCode() %>" <%if(mode.getCode().equals(model.getSubway1())){out.print(" selected='selected' ");} %>><%=mode.getCodename() %></option>					
<%
	}
%>
								</select>
							</td>
							<td>
								<div id="divSubWay2">
								<select name="subway2" style="width:100px;">
									<option value="선택">선택</option>
								</select>
								</div>
								</td>
								<td>
								<select name="subway3" style="width:100px;">
									<option value="5" <%if(model.getSubway3().equals("5분거리")){out.print(" selected='selected' ");} %> >5분거리</option>
									<option value="10" <%if(model.getSubway3().equals("10분거리")){out.print(" selected='selected' ");} %> >10분거리</option>
									<option value="15" <%if(model.getSubway3().equals("15분거리")){out.print(" selected='selected' ");} %> >15분거리</option>
									<option value="20" <%if(model.getSubway3().equals("20분거리")){out.print(" selected='selected' ");} %> >20분거리</option>
									<option value="25" <%if(model.getSubway3().equals("25분거리")){out.print(" selected='selected' ");} %> >25분거리</option>
									<option value="30" <%if(model.getSubway3().equals("30분거리")){out.print(" selected='selected' ");} %> >30분거리</option>
									<option value="35" <%if(model.getSubway3().equals("35분거리")){out.print(" selected='selected' ");} %> >35분거리</option>
									<option value="40" <%if(model.getSubway3().equals("40분거리")){out.print(" selected='selected' ");} %> >40분거리</option>
									<option value="45" <%if(model.getSubway3().equals("45분거리")){out.print(" selected='selected' ");} %> >45분거리</option>
								</select>
				        </tr>
				        <tr>
							<th scope="row" >난방시설</th>
							<td>
								<select name="heating" style="width:100px;">
<%
	for(int i = 0; i < heatingList.size(); i++){
		codeModel mode = (codeModel)heatingList.get(i);
%>
									<option value="<%=mode.getCode() %>" <%if(model.getHeating().equals(mode.getCode())){out.print(" selected='selected' ");} %>><%=mode.getCodename() %></option>					
<%
	}
%>
								</select>
							</td>
							<th scope="row" >냉방시설 </th>
							<td>
								<select name="airconditioning" style="width:100px;">
<%
	for(int i = 0; i < airconditioningList.size(); i++){
		codeModel mode = (codeModel)airconditioningList.get(i);
%>
									<option value="<%=mode.getCode() %>" <%if(model.getAirconditioning().equals(mode.getCode())){out.print(" selected='selected' ");} %>><%=mode.getCodename() %></option>					
<%
	}
%>
								</select>
							</td>
				        </tr>
				        <tr>
							<th scope="row" >대학교</th>
							<td >
								<select name="university1" id="university1" style="width:100px;">
<%
	for(int i = 0; i < university1List.size(); i++){
		codeModel mode = (codeModel)university1List.get(i);
%>
									<option value="<%=mode.getCode() %>" <%if(model.getUniversity1().equals(mode.getCode())){out.print(" selected='selected' ");} %>><%=mode.getCodename() %></option>					
<%
	}
%>	
								</select>
								</td>
								<td colspan="2">
								<div id="divuniversity2">
								<select name="university2" style="width:100px;">
									<option value="선택">선택</option>
								</select>
								</div>
							</td>
				        </tr>
				        <tr>
							<th scope="row" >임대형태</th>
							<td colspan="3">
								<input type="radio" name="lease" value="즉시임주" <%if(model.getLease().equals("즉시입주")){out.print(" checked='checked' ");} %>/>즉시입주
								<input type="radio" name="lease" value="입주가능일 지정" <%if(model.getLease().equals("입주가능일 지정")){out.print(" checked='checked' ");} %>/>입주가능일 지정
								
								<select name="leaseyear" style="width:100px;">
									<option value="2011" <%if(model.getLeaseyear().equals("2011")){out.print(" selected='selected' ");} %>>2011</option>
									<option value="2010" <%if(model.getLeaseyear().equals("2010")){out.print(" selected='selected' ");} %>>2010</option>
									<option value="2009" <%if(model.getLeaseyear().equals("2009")){out.print(" selected='selected' ");} %>>2009</option>
									<option value="2008" <%if(model.getLeaseyear().equals("2008")){out.print(" selected='selected' ");} %>>2008</option>
								</select>
								<select name="leasemonth" style="width:100px;">
									<option value="12" <%if(model.getLeasemonth().equals("12")){out.print(" selected='selected' ");} %>>12</option>
									<option value="11" <%if(model.getLeasemonth().equals("11")){out.print(" selected='selected' ");} %>>11</option>
									<option value="10" <%if(model.getLeasemonth().equals("10")){out.print(" selected='selected' ");} %>>10</option>
									<option value="9" <%if(model.getLeasemonth().equals("9")){out.print(" selected='selected' ");} %>>9</option>
									<option value="8" <%if(model.getLeasemonth().equals("8")){out.print(" selected='selected' ");} %>>8</option>
									<option value="7" <%if(model.getLeasemonth().equals("7")){out.print(" selected='selected' ");} %>>7</option>
									<option value="6" <%if(model.getLeasemonth().equals("6")){out.print(" selected='selected' ");} %>>6</option>
									<option value="5" <%if(model.getLeasemonth().equals("5")){out.print(" selected='selected' ");} %>>5</option>
									<option value="4" <%if(model.getLeasemonth().equals("4")){out.print(" selected='selected' ");} %>>4</option>
									<option value="3" <%if(model.getLeasemonth().equals("3")){out.print(" selected='selected' ");} %>>3</option>
									<option value="2" <%if(model.getLeasemonth().equals("2")){out.print(" selected='selected' ");} %>>2</option>
									<option value="1" <%if(model.getLeasemonth().equals("1")){out.print(" selected='selected' ");} %>>1</option>
								</select>
								<select name="leaseday" style="width:100px;">
									<option value="31" <%if(model.getLeaseday().equals("31")){out.print(" selected='selected' ");} %>>31</option>
									<option value="30" <%if(model.getLeaseday().equals("30")){out.print(" selected='selected' ");} %>>30</option>
									<option value="29" <%if(model.getLeaseday().equals("29")){out.print(" selected='selected' ");} %>>29</option>
									<option value="28" <%if(model.getLeaseday().equals("28")){out.print(" selected='selected' ");} %>>28</option>
									<option value="27" <%if(model.getLeaseday().equals("27")){out.print(" selected='selected' ");} %>>27</option>
									<option value="26" <%if(model.getLeaseday().equals("26")){out.print(" selected='selected' ");} %>>26</option>
									<option value="25" <%if(model.getLeaseday().equals("25")){out.print(" selected='selected' ");} %>>25</option>
									<option value="24" <%if(model.getLeaseday().equals("24")){out.print(" selected='selected' ");} %>>24</option>
									<option value="23" <%if(model.getLeaseday().equals("23")){out.print(" selected='selected' ");} %>>23</option>
									<option value="22" <%if(model.getLeaseday().equals("22")){out.print(" selected='selected' ");} %>>22</option>
									<option value="21" <%if(model.getLeaseday().equals("21")){out.print(" selected='selected' ");} %>>21</option>
									<option value="20" <%if(model.getLeaseday().equals("20")){out.print(" selected='selected' ");} %>>20</option>
									<option value="19" <%if(model.getLeaseday().equals("19")){out.print(" selected='selected' ");} %>>19</option>
									<option value="18" <%if(model.getLeaseday().equals("18")){out.print(" selected='selected' ");} %>>18</option>
									<option value="17" <%if(model.getLeaseday().equals("17")){out.print(" selected='selected' ");} %>>17</option>
									<option value="16" <%if(model.getLeaseday().equals("16")){out.print(" selected='selected' ");} %>>16</option>
									<option value="15" <%if(model.getLeaseday().equals("15")){out.print(" selected='selected' ");} %>>15</option>
									<option value="14" <%if(model.getLeaseday().equals("14")){out.print(" selected='selected' ");} %>>14</option>
									<option value="13" <%if(model.getLeaseday().equals("13")){out.print(" selected='selected' ");} %>>13</option>
									<option value="12" <%if(model.getLeaseday().equals("12")){out.print(" selected='selected' ");} %>>12</option>
									<option value="11" <%if(model.getLeaseday().equals("11")){out.print(" selected='selected' ");} %>>11</option>
									<option value="10" <%if(model.getLeaseday().equals("10")){out.print(" selected='selected' ");} %>>10</option>
									<option value="9" <%if(model.getLeaseday().equals("9")){out.print(" selected='selected' ");} %>>9</option>
									<option value="8" <%if(model.getLeaseday().equals("8")){out.print(" selected='selected' ");} %>>8</option>
									<option value="7" <%if(model.getLeaseday().equals("7")){out.print(" selected='selected' ");} %>>7</option>
									<option value="6" <%if(model.getLeaseday().equals("6")){out.print(" selected='selected' ");} %>>6</option>
									<option value="5" <%if(model.getLeaseday().equals("5")){out.print(" selected='selected' ");} %>>5</option>
									<option value="4" <%if(model.getLeaseday().equals("4")){out.print(" selected='selected' ");} %>>4</option>
									<option value="3" <%if(model.getLeaseday().equals("3")){out.print(" selected='selected' ");} %>>3</option>
									<option value="2" <%if(model.getLeaseday().equals("2")){out.print(" selected='selected' ");} %>>2</option>
									<option value="1" <%if(model.getLeaseday().equals("1")){out.print(" selected='selected' ");} %>>1</option>
								</select>
							</td>
				        </tr>
				        <tr>
							<th scope="row" >가구</th>
							<td colspan="3">
<%
	String[] furniture = model.getFurniture1().split(",");
	for(int i = 0; i < furnitureList.size(); i++){
		codeModel mode = (codeModel)furnitureList.get(i);
		String checked = "";
			for(int j = 0; j<furniture.length; j++){
				if(furniture[j].equals(mode.getCode())){
					checked = " checked='checked' ";
				}
			}
%>
									<input type="checkbox" name="furniture1" id="furniture1" value="<%=mode.getCode() %>" <%=checked %>/> <%=mode.getCodename() %>				
<%
	}
%>	
							</td>
				        </tr>
				        <tr>
							<th scope="row" >가전</th>
							<td colspan="3">
<%
	String[] appliances = model.getAppliances1().split(",");
	for(int i = 0; i < appliancesList.size(); i++){
		codeModel mode = (codeModel)appliancesList.get(i);
		String checked = "";
		for(int j = 0; j<appliances.length; j++){
			if(appliances[j].equals(mode.getCode())){
				checked = " checked='checked' ";
			}
		}
%>
									<input type="checkbox" name="appliances1" id="appliances1" value="<%=mode.getCode() %>" <%=checked %>/> <%=mode.getCodename() %>				
<%
	}
%>
							</td>
				        </tr>
				        <tr>
							<th scope="row" >주방/욕실</th>
							<td colspan="3">
<%
	String[] kitchen = model.getKitchen1().split(",");
	for(int i = 0; i < kitchenList.size(); i++){
		codeModel mode = (codeModel)kitchenList.get(i);
		String checked = "";
		for(int j = 0; j<kitchen.length; j++){
			if(kitchen[j].equals(mode.getCode())){
				checked = " checked='checked' ";
			}
		}
%>
									<input type="checkbox" name="kitchen1" id="kitchen1" value="<%=mode.getCode() %>" <%=checked %>/> <%=mode.getCodename() %>				
<%
	}
%>
							</td>
				        </tr>
				        <tr>
							<th scope="row" >보안</th>
							<td colspan="3">
<%
	String[] security = model.getSecurity1().split(",");
	for(int i = 0; i < securityList.size(); i++){
		codeModel mode = (codeModel)securityList.get(i);
		String checked = "";
		for(int j = 0; j<security.length; j++){
			if(security[j].equals(mode.getCode())){
				checked = " checked='checked' ";
			}
		}
%>
									<input type="checkbox" name="security1" id="security1" value="<%=mode.getCode() %>" <%=checked %>/> <%=mode.getCodename() %>				
<%
	}
%>
							</td>
				        </tr>
				        <tr>
							<th scope="row" >주변시설</th>
							<td colspan="3">
<%
	String[] facility = model.getFacility1().split(",");
	for(int i = 0; i < facilityList.size(); i++){
		codeModel mode = (codeModel)facilityList.get(i);
		String checked = "";
		for(int j = 0; j<facility.length; j++){
			if(facility[j].equals(mode.getCode())){
				checked = " checked='checked' ";
			}
		}
%>
									<input type="checkbox" name="facility1" id="facility1" value="<%=mode.getCode() %>" <%=checked %>/> <%=mode.getCodename() %>				
<%
	}
%> 
							</td>
				        </tr>
				    </tbody>
					</table>
					<br></br>
					<p class="sub-text2"> 홍보사항 </p>
					<table class="view-normal" cellpadding="0" cellspacing="0" summary="홍보사항" >
					<caption>홍보사항</caption>
					    <col width="100px" />  
					    <col width="239px" />  
					    <col width="100px" />  
					    <col width="239px" />  
				    <tbody>
				     	<tr>
							<th scope="row" >제목</th>
							<td colspan="3">
							<input name="title" id="title" value="<%=model.getTitle() %>" title="제목" type="text"  style="width:400px;" />
							</td>
				        </tr>
				        <tr>
							<th scope="row" >내용</th>
							<td colspan="3">
							<textarea name="content" style="width:400px; height:300px;"><%=model.getContent()%></textarea>
							</td>
				        </tr>
				        <tr>
							<th scope="row" >담당자</th>
							<td>
							<input name="person" id="person" value="<%=model.getPerson() %>" title="담당자" type="text"  style="width:100px;" />
							</td>
							<th scope="row" >연락처</th>
							<td>
							<input name="tel1" id="tel1" value="<%=model.getTel1() %>" title="연락처1" type="text"  style="width:50px;" /> -
							<input name="tel2" id="tel2" value="<%=model.getTel2() %>" title="연락처2" type="text"  style="width:50px;" /> - 
							<input name="tel3" id="tel3" value="<%=model.getTel3() %>" title="연락처3" type="text"  style="width:50px;" />
							</td>
				        </tr>
				    </tbody>
					</table>
					<br></br>
					<p class="sub-text2"> 사진등록 </p>
					<table class="view-normal" cellpadding="0" cellspacing="0" summary="홍보사항" >
					<caption>홍보사항</caption> 
					    <col width="339px" />   
					    <col width="339px" />  
				    <tbody>
				     	<tr>
							<td>
							<img src="/download/<%=model.getPhoto1_big() %>?name=<%=model.getPhoto1_big() %>&kind=img" /><br/>
							<input type="file" name="photo1" id="photo1" style="width:265px;" /> <input type="radio" name="photo1_main" value="1" <%if(model.getPhoto1_main().equals("1")){out.print(" checked='checked' ");} %>/> 메인<br/>
							<input type="checkbox" value="Y" name="delphoto1"/> 삭제  
							<input type="hidden" name="photo1_path" value="<%=model.getPhoto1()%>"/>
							<input type="hidden" name="photo1_small" value="<%=model.getPhoto1_small()%>"/>
							<input type="hidden" name="photo1_big" value="<%=model.getPhoto1_big()%>"/>
							</td>
							<td>
							<img src="/download/<%=model.getPhoto2_big() %>?name=<%=model.getPhoto2_big() %>&kind=img" /><br/>
							<input type="file" name="photo2" id="photo2" style="width:265px;" /> <input type="radio" name="photo1_main" value="2" <%if(model.getPhoto1_main().equals("2")){out.print(" checked='checked' ");} %>/> 메인<br/>
							<input type="checkbox" value="Y" name="delphoto2"/> 삭제  
							<input type="hidden" name="photo2_path" value="<%=model.getPhoto2()%>"/>
							<input type="hidden" name="photo2_small" value="<%=model.getPhoto2_small()%>"/>
							<input type="hidden" name="photo2_big" value="<%=model.getPhoto2_big()%>"/>
							</td>
				        </tr>
				        <tr>
							<td>
							<img src="/download/<%=model.getPhoto3_big() %>?name=<%=model.getPhoto3_big() %>&kind=img" /><br/>
							<input type="file" name="photo3" id="photo3" style="width:265px;" /> <input type="radio" name="photo1_main" value="3" <%if(model.getPhoto1_main().equals("3")){out.print(" checked='checked' ");} %>/> 메인<br/>
							<input type="checkbox" value="Y" name="delphoto3"/> 삭제  
							<input type="hidden" name="photo3_path" value="<%=model.getPhoto3()%>"/>
							<input type="hidden" name="photo3_small" value="<%=model.getPhoto3_small()%>"/>
							<input type="hidden" name="photo3_big" value="<%=model.getPhoto3_big()%>"/>
							</td>
							<td>
							<img src="/download/<%=model.getPhoto4_big() %>?name=<%=model.getPhoto4_big() %>&kind=img" /><br/>
							<input type="file" name="photo4" id="photo4" style="width:265px;" /> <input type="radio" name="photo1_main" value="4" <%if(model.getPhoto1_main().equals("4")){out.print(" checked='checked' ");} %>/> 메인<br/>
							<input type="checkbox" value="Y" name="delphoto4"/> 삭제  
							<input type="hidden" name="photo4_path" value="<%=model.getPhoto4()%>"/>
							<input type="hidden" name="photo4_small" value="<%=model.getPhoto4_small()%>"/>
							<input type="hidden" name="photo4_big" value="<%=model.getPhoto4_big()%>"/>
							</td>
				        </tr>
				        <tr>
							<td>
							<img src="/download/<%=model.getPhoto5_big() %>?name=<%=model.getPhoto5_big() %>&kind=img" /><br/>
							<input type="file" name="photo5" id="photo5" style="width:265px;" /> <input type="radio" name="photo1_main" value="5" <%if(model.getPhoto1_main().equals("5")){out.print(" checked='checked' ");} %>/> 메인<br/>
							<input type="checkbox" value="Y" name="delphoto5"/> 삭제  
							<input type="hidden" name="photo5_path" value="<%=model.getPhoto5()%>"/>
							<input type="hidden" name="photo5_small" value="<%=model.getPhoto5_small()%>"/>
							<input type="hidden" name="photo5_big" value="<%=model.getPhoto5_big()%>"/>
							</td> 
							<td>
							<img src="/download/<%=model.getPhoto6_big() %>?name=<%=model.getPhoto6_big() %>&kind=img" /><br/>
							<input type="file" name="photo6" id="photo6" style="width:265px;" /> <input type="radio" name="photo1_main" value="6" <%if(model.getPhoto1_main().equals("6")){out.print(" checked='checked' ");} %>/> 메인<br/>
							<input type="checkbox" value="Y" name="delphoto6"/> 삭제  
							<input type="hidden" name="photo6_path" value="<%=model.getPhoto6()%>"/>
							<input type="hidden" name="photo6_small" value="<%=model.getPhoto6_small()%>"/>
							<input type="hidden" name="photo6_big" value="<%=model.getPhoto6_big()%>"/>
							</td>
				        </tr>
				    </tbody>
					</table>
				<!-- 버튼 시작 -->
				<div class="btn-all-align2">
				  <span class="btn-align"><input type="submit" value="수정" class="btn-bg-gray"  /></span>
				  <span class="btn-align"><input type="button" value="목록" id="btList" class="btn-bg-gray"  /></span>
				</div>
				<!-- 버튼 끝 -->
				<!-- 실제적인 리스트 끝 -->
				</form>
			</div>
			<!--Contents End-->
		</div>
	</div>
</div>
<!--floater-->
<%@ include file="/admin/common/bottom.jsp" %>
<!--floater-->
</body>
</html>